package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface SetmealDishMapper {


        //根据菜品ids查询被套餐引用的个数
    Integer getCountByDishIds(@Param("ids") List<Long> ids);

    /**
     * 根据菜品id查询对应的套餐id
     *
     * @param dishIds
     * @return
     */

    List<Long> getSetmealIdsByDishIds( List<Long> dishIds);

    //新增套餐
    void insertBatch(List<SetmealDish> setmealDishes);
    //修改套餐
    // void getSetmealIdsByDishIds(SetmealDTO setmealDTO, Long id);

    //删除套餐关联的菜品id
    void DeleteSetmeal(ArrayList<Long> arrayList);

    List<SetmealDish> getBySetmealId(Long id);
}

